package com.kang.c0c.tree.node;


/**
 * 定义了抽象语法树中的while子节点
 * while		：WHILE		while循环 while'('condition')'Block1';'
 * 
 * @field:
 * condition	：条件子节点
 * execBlock	：condition为真时执行的程序块节点
 * 
 * @author kang
 *
 * Feb 6, 2009
 */

public class WhileNode extends Node implements Nodes{
	private BinaryNode condition;
	private BlockNode execBlock;
	
	public WhileNode(){
		this(null,null);
	}
	
	public WhileNode(BinaryNode condition,BlockNode execBlock){
		super(WHILE);
		this.condition = condition;
		this.execBlock = execBlock;
	}

	public BinaryNode getCondition() {
		return condition;
	}

	public void setCondition(BinaryNode condition) {
		this.condition = condition;
	}

	public BlockNode getExecBlock() {
		return execBlock;
	}

	public void setExecBlock(BlockNode execBlock) {
		this.execBlock = execBlock;
	}

	
}
